//
//  GJFSingleTool.h
//  Wedding
//
//  Created by 郭静芬 on 2016/12/23.
//  Copyright © 2016年 郭静芬. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "GJFUserInfo.h"
#define USERINFOPATH [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject] stringByAppendingPathComponent:@"user.ggg"]

typedef void(^LeftAction)(void);
typedef void(^RightAction)(void);

@interface GJFSingleTool : NSObject

@property (nonatomic, strong)GJFUserInfo *userInfo;

+ (GJFSingleTool *)shareInstance;

+ (void)saveUserInfo;

+ (NSString *)os_name;
+ (NSString *)app_build;
+ (NSString *)app_version;
+ (NSString *)protocol_version;

+ (BOOL)is_login;

/** md5加密*/
+ (NSString *)md5:(NSString *)str;

+ (UIViewController*)topViewController;

+ (void)bingDeviceToken;

+ (void)showAlertTitle:(NSString *)title Message:(NSString *)msg leftTitle:(NSString *)leftTitle rightTitle:(NSString *)rightTitle delayTime:(NSInteger)sec leftAction:(LeftAction)leftBlock rightAction:(RightAction)rightAction;

+ (CGFloat)heightWithText:(NSString *)text fontSize:(CGFloat)fontsize Width:(CGFloat)width;

+ (UIImage *)imageWithColor:(UIColor *)color;

+ (void)shareToViewController:(UIViewController<UMSocialShareMenuViewDelegate> *)vc title:(NSString *)title content:(NSString *)content image:(UIImage *)image url:(NSString *)url;
@end
